class instrument:
    def __init__(self):
        pass    
    
    def make_sound(self):
        print("乐器发出声音")
        
class piano(instrument):
    def __init__(self):
        pass
    
    def make_sound(self):
        print("钢琴发出声音")   
        
class guitar(instrument):
    def __init__(self):
        pass
    
    def make_sound(self):
        print("吉他发出声音")   
        
class drum(instrument):
    def __init__(self):
        pass
    
    def make_sound(self):
        print("鼓发出声音")

def play_music(inst):
    inst.make_sound()
    
if __name__ == "__main__":
    inst1 = piano()
    inst2 = guitar()
    inst3 = drum()
    
    play_music(inst1)
    play_music(inst2)
    play_music(inst3)
    
